With ongoing development of network technologies, virtual machines and virtual networks are applied more widely. To reduce operation costs of a data center and enhance virtual machine reliability, an operator needs to dynamically migrate virtual machines throughout the entire data center in a large scope instead of migrating virtual machines within a limited scope of a convergence or access switching endpoint. A traditional data center uses a layer 2 plus layer 3 networking architecture. If a virtual machine is migrated across layer 2, an Internet Protocol (IP) address of the virtual machine needs to be changed. Dynamic change of the IP address of the virtual machine may lead to interruption of an existing service connection, and affect normal service running. For example, a virtual machine VM 1 and a virtual machine VM 2 belong to a same virtual local area network but belong to different switching endpoints (or switching nodes such as a virtual tunnel endpoint (VTEP) device). To communicate with the virtual machine VM 2, the virtual machine VM 1 needs to know an IP address and a media access control (MAC) address of the virtual machine VM 2. However, if the virtual machine VM 2 is migrated across layer 2, the virtual machine VM 1 is unable to know the IP address and the MAC address of the virtual machine VM 2. Consequently, the virtual machine VM 1 and the virtual machine VM 2 cannot be normally connected.
In the prior art, when an IP address of a virtual machine changes dynamically, a virtual local area network learns a MAC address of the virtual machine in a multicast manner to ensure normal communication. For example, a switch to which the VM 1 belongs and a switch to which the VM 2 belongs are located in a same virtual local area network. When the virtual machine VM 1 needs to acquire an address of the virtual machine VM 2, the VM 1 sends an address acquisition request to the switch to which the VM 1 belongs. After receiving the address acquisition request, the switch to which the VM 1 belongs sends, in the multicast manner, the address acquisition request to all switches that are located in the same virtual local area network as the switch to which the VM 1 belongs. After receiving the address acquisition request, the switch to which the VM 2 belongs sends the address acquisition request to the VM 2. After receiving the address acquisition request, the VM 2 sends a response to the switch to which the VM 1 belongs via the switch to which the VM 2 belongs, where the response includes the address of the VM 2. The switch to which the VM 1 belongs sends the response to the VM 1 such that the VM 1 receives the response and acquires the address of the VM 2.
However, an existing switch can support up to 16 million (M) virtual machines in standard, and therefore, the switch needs to support 16 M multicast groups in theory. However, an existing physical switch supports a relatively small quantity of multicast groups, which is generally 500-2000 multicast groups, which leads to a limitation on a quantity of created switches due to an insufficient quantity of multicast groups of the switch. For example, when the switch to which the VM 1 belongs sends, in the multicast manner, the address acquisition request to all switches that are located in the same virtual local area network as the VM 1, if the switch to which the VM 1 belongs supports 100 multicast groups, a quantity of switches located in the same virtual local area network as the VM 1 is necessarily less than or equal to 100, which may lead to a limitation on the quantity of switches due to a relatively small quantity of multicast groups supported by the switch to which the VM 1 belongs.